(* get_precision
 * Read precision file and returns datas.
 * Inputs:
       path as string : File path.
 *)
let get_precision path =
   try
   let f = open_in path in
   let hardautosmooth = (int_of_string (input_line f)) = 1 in
   let autosmooth = (int_of_string (input_line f)) = 1 in
   let tau =  float_of_string (input_line f) in
   let p = int_of_string (input_line f) in
       close_in f;
    (hardautosmooth, autosmooth, tau, p)
   with _ ->


let set_precision path hardautosmooth autosmooth tau p=
      let f = open_out path in
         Printf.fprintf f "%s\n" (if hardautosmooth then "1" else "0");
         Printf.fprintf f "%s\n" (if autosmooth then "1" else "0");
         Printf.fprintf f "%s\n" (string_of_float tau);
         Printf.fprintf f "%s\n" (string_of_float p);
         close_out f;
         (false,true,2.,5)


